<?php $this->pageTitle = "Mantenedor de proveedores"; ?>
<?php if(empty($suppliers)) : ?>
No existen registros de proveedores <br></br>
<?php
echo $this->Html->image('icon_pers/addp1.png');
echo $this->Html->link('Añadir Proveedor',(array('action'=>'add'))); ?>
<?php else: ?>
        <fieldset>
        <legend>
            Proveedores
        </legend>
        </fieldset>

<table>
    <tr>
        <th>Nombre</th>
        <th>Codigo</th>
        <th>Razon Social</th>
        <th>Telefono</th>
    </tr>
    
    
    <?php foreach ($suppliers as $proveedor): ?>
    <tr>
        <td><?php echo $proveedor['Supplier']['nombre']; ?></td>
        <td><?php //echo $proveedor['Supplier']['codigo']. '-' .$proveedor['Supplier']['dv']; ?></td>
        <td><?php //echo $proveedor['Supplier']['razon_social']; ?></td>
        <td><?php echo $proveedor['Supplier']['telefono']; ?></td>
        
        
        <td>
            <?php
            echo $this->Html->image('icon_pers/edit.png');
            echo $this->Html->link(   'Editar',
                                            array('action'=>'edit',$proveedor['Supplier']['id']),  
                                            array(),
                                            "¿Esta seguro que desea modificar este registro?"
                                        );
            ?>
        </td>
        <td>
            <?php
            echo $this->Html->image('icon_BOD/borrar.png');
            echo $this->Html->link(   'Eliminar',
                                            array('action'=>'delete',$proveedor['Supplier']['id']),  
                                            array(),
                                            "¿Esta seguro que desea eliminar este registro?"
                                        ); ?></td>
        
    </tr>
    <?php endforeach; ?>
    
    
    
</table>
<?php
    echo $this->Html->image('icon_pers/addp1.png');
    echo $this->Html->link('Añadir Proveedor ',(array('action'=>'add')));
    ?>
<br> 
<?php
    echo $this->Html->image('icon_pers/ver.png');
    echo $this->Html->link('Mostrar todos',(array('action'=>'indexcompleto'))); 
    ?>
<?php endif; ?>